#include <stdio.h>

int main(int argc, char *argv[])
{
    // ---------------三维数组----------
    int arr[3][3][2] = {
        {{1, 2}, {3, 4}, {5, 6}}, 
        {{7, 8}, {9, 10}, {11, 12}}, 
        {{13, 14}, {15, 16}, {17, 18}}
    };

    int *p = &arr[0][0][0];
    int size = sizeof(arr) / sizeof(int);

    for (int i = 0; i < size; i++) {
        printf("%d ", *(p + i));
    }

    printf("\n");

















    /*
       printf("arr %p\n", arr);
       printf("arr[0] %p\n", &arr[0]);
       printf("arr[0][0] %p\n", &arr[0][0]);
       printf("arr[0][0][0] %p\n", &arr[0][0][0]);
       printf("arr_p2 %p\n", arr_p2);

       for (int i = 0; i < size; i++) {
       printf("%d ", arr_p2[i]);
       }

       putchar('\n');
       */

    return 0;
}
